package cn.golxen.blog.service;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class TestRabbitMQ {

//    @RabbitListener(queues = "TestQue")
//    @RabbitHandler
//    public void test(int i){
//        Random random=new Random();
//        try {
//            Thread.sleep(random.nextInt(500));
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
//        System.out.println("任务:"+i);
//
//    }
}
